<script>

import { defineComponent, ref } from 'vue';
export default defineComponent({
  props: {
    params: {
      type: Object,
      default: () => {}
    }
  },
  setup(props){
    const str = ref<string>('tsx的使用');
    const clickFunc1 = () => {
      console.log('没有参数');
    }
    const clickFunc2 = (msg = '默认值') => {
      console.log(msg);
      console.log(props);
    }
    return () => (
      <>
        <div class='async'>{str.value}</div>
        <button onClick={clickFunc1}>不传参数点击</button>
        <button onClick={() => clickFunc2('额外参数')}>传参数点击</button>
      </>
    );
  }
})
</script>

